﻿using System;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using JsonCSharpClassGenerator;

namespace BEX.Core.Exchange.MtGox.MtGoxResponseJsonTypes
{
    public class Data
    {
        private JObject __jobject;
        public Data(JObject obj)
        {
            this.__jobject = obj;
        }

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private High _high;
        public High high
        {
            get
            {
                if (_high == null)
                {
                    _high = JsonClassHelper.ReadStronglyTypedObject<High>(JsonClassHelper.GetJToken<JObject>(__jobject, "high"));
                }
                return _high;
            }
        }

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private Low _low;
        public Low low
        {
            get
            {
                if (_low == null)
                {
                    _low = JsonClassHelper.ReadStronglyTypedObject<Low>(JsonClassHelper.GetJToken<JObject>(__jobject, "low"));
                }
                return _low;
            }
        }

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private Avg _avg;
        public Avg avg
        {
            get
            {
                if (_avg == null)
                {
                    _avg = JsonClassHelper.ReadStronglyTypedObject<Avg>(JsonClassHelper.GetJToken<JObject>(__jobject, "avg"));
                }
                return _avg;
            }
        }

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private Vwap _vwap;
        public Vwap vwap
        {
            get
            {
                if (_vwap == null)
                {
                    _vwap = JsonClassHelper.ReadStronglyTypedObject<Vwap>(JsonClassHelper.GetJToken<JObject>(__jobject, "vwap"));
                }
                return _vwap;
            }
        }

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private Vol _vol;
        public Vol vol
        {
            get
            {
                if (_vol == null)
                {
                    _vol = JsonClassHelper.ReadStronglyTypedObject<Vol>(JsonClassHelper.GetJToken<JObject>(__jobject, "vol"));
                }
                return _vol;
            }
        }

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private LastLocal _last_local;
        public LastLocal last_local
        {
            get
            {
                if (_last_local == null)
                {
                    _last_local = JsonClassHelper.ReadStronglyTypedObject<LastLocal>(JsonClassHelper.GetJToken<JObject>(__jobject, "last_local"));
                }
                return _last_local;
            }
        }

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private LastOrig _last_orig;
        public LastOrig last_orig
        {
            get
            {
                if (_last_orig == null)
                {
                    _last_orig = JsonClassHelper.ReadStronglyTypedObject<LastOrig>(JsonClassHelper.GetJToken<JObject>(__jobject, "last_orig"));
                }
                return _last_orig;
            }
        }

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private LastAll _last_all;
        public LastAll last_all
        {
            get
            {
                if (_last_all == null)
                {
                    _last_all = JsonClassHelper.ReadStronglyTypedObject<LastAll>(JsonClassHelper.GetJToken<JObject>(__jobject, "last_all"));
                }
                return _last_all;
            }
        }

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private Last _last;
        public Last last
        {
            get
            {
                if (_last == null)
                {
                    _last = JsonClassHelper.ReadStronglyTypedObject<Last>(JsonClassHelper.GetJToken<JObject>(__jobject, "last"));
                }
                return _last;
            }
        }

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private Buy _buy;
        public Buy buy
        {
            get
            {
                if (_buy == null)
                {
                    _buy = JsonClassHelper.ReadStronglyTypedObject<Buy>(JsonClassHelper.GetJToken<JObject>(__jobject, "buy"));
                }
                return _buy;
            }
        }

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private Sell _sell;
        public Sell sell
        {
            get
            {
                if (_sell == null)
                {
                    _sell = JsonClassHelper.ReadStronglyTypedObject<Sell>(JsonClassHelper.GetJToken<JObject>(__jobject, "sell"));
                }
                return _sell;
            }
        }

        public string item
        {
            get
            {
                return JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "item"));
            }
        }

        public string now
        {
            get
            {
                return JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "now"));
            }
        }
    }
}
